<!DOCTYPE html>
<html>
<head>
    <!-- 页面meta -->
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>工程管理</title>
    <meta name="description" content="工程管理">
    <meta name="keywords" content="工程管理">
    <meta content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no" name="viewport">
    <!-- 引入样式 -->
    <link rel="stylesheet" href="element-ui/index.css">
    <link rel="stylesheet" href="font-awesome/css/font-awesome.min.css">
    <link rel="stylesheet" href="css/style.css">
    <style type="text/css">
        .el-main {
            position: absolute;
            top: 70px;
            bottom: 0px;
            left: 200px;
            right: 10px;
            padding: 0;
        }
    </style>
</head>
<body class="hold-transition skin-purple sidebar-mini">
<div id="app">
    <el-container>

        <!-- 导航栏部分 -->
        <el-header class="main-header" style="height:70px;">
            <nav class="navbar navbar-static-top" :class=''>
                <!-- Logo -->
                <a href="#" class="logo" style="text-align:center">
                    <span class="logo-lg" >房地产工程后台管理系统</span>
                </a>
                <div class="right-menu">
                    <span class="help"><i class="fa fa-exclamation-circle" aria-hidden="true"></i>帮助</span>
                    <el-dropdown class="avatar-container right-menu-item" trigger="click">
                        <div class="avatar-wrapper">
                            <img src="img/user.jpg" class="user-avatar">
                            晗先生
                        </div>
                        <el-dropdown-menu slot="dropdown">
                            <el-dropdown-item divided>
                                <span style="display:block;">修改密码</span>
                            </el-dropdown-item>
                            <el-dropdown-item divided>
                                <span style="display:block;">退出</span>
                            </el-dropdown-item>
                            <el-dropdown-item divided>
                                <span style="display:block;">切换账号</span>
                            </el-dropdown-item>
                        </el-dropdown-menu>
                    </el-dropdown>
                </div>
            </nav>
        </el-header>

        <!-- 主题部分 -->
        <el-container>
            <el-aside width="200px">
                <el-menu>
                    <el-submenu v-for="menu in menuList" :index="menu.path">
                        <template slot="title">
                            <i class="fa" :class="menu.icon"></i>
                            {{menu.title}}
                        </template>
                        <template v-for="child in menu.children">
                            <el-menu-item :index="child.path">
                                <a :href="child.linkUrl" target="right">{{child.title}}</a>
                            </el-menu-item>
                        </template>
                    </el-submenu>
                </el-menu>
            </el-aside>

            <!-- 工程列表页面 -->
            <!-- iframe创建包含另外一个文档的内联框架（即行内框架）-->
            <el-container>
                <iframe name="right" class="el-main" src="pages/project/project_item.html" width="100%" height="650px"
                        frameborder="0"></iframe>
            </el-container>
        </el-container>

    </el-container>
</div>
</body>
<!-- 引入组件库 -->
<script src="js/vue.js"></script>
<script src="element-ui/index.js"></script>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script>
    new Vue({
        el: '#app',
        data: {
            menuList: [
                {
                    "path": "1",
                    "title": "工程管理",
                    "icon": "el-icon-setting",
                    "children": [
                        {
                            "path": "/1-1",
                            "title": "工程项目列表",
                            "linkUrl": "pages/project/project_item.html",
                            "childrem": []
                        },
                        {
                            "path": "/1-2",
                            "title": "工程阶段列表",
                            "linkUrl": "pages/project/stage_list.html",
                            "children": []
                        }
                    ]
                },
                {
                    "path": "2",
                    "title": "开发商管理",
                    "icon": "fa-user-md",
                    "children": [
                        {
                            "path": "/2-1",
                            "title": "开发商列表",
                            "linkUrl": "pages/developer/developer_list.html",
                            "children": []
                        },
                        {
                            "path": "/2-2",
                            "title": "开发商部门",
                            "linkUrl": "pages/developer/branch_list.html",
                            "children": []
                        },
                        {
                            "path": "/2-3",
                            "title": "任务计划",
                            "linkUrl": "pages/developer/taskplan.html",
                            "children": []
                        }
                    ]
                },
                {
                    "path": "3",
                    "title": "承包商管理",
                    "icon": "fa-tty",
                    "children": [
                        {
                            "path": "/3-1",
                            "title": "承包商列表",
                            "linkUrl": "pages/contractor/contractor_list.html",
                            "children": []
                        },
                        {
                            "path": "/3-2",
                            "title": "分项工程",
                            "linkUrl": "pages/contractor/subitem.html",
                            "children": []
                        },
                        {
                            "path": "/3-3",
                            "title": "分项子工程",
                            "linkUrl": "pages/contractor/item.html",
                            "children": []
                        }
                    ]
                }

            ]
        }
    });
    $(function () {
        var wd = 200;
        $(".el-main").css('width', $('body').width() - wd + 'px');
    });
</script>
</html>
